/*-
 * Copyright (C) 2018-2020, Shanghai Trusted Industry Control Platform Co., Ltd.
 * Created by 周正辉 (Zhenghui Zhou) <zhouzhenghui@ticpsh.com>, 赵楷文 (Kaiwen
 * Zhao) <zhaokaiwen@ticpsh.com>
 */

#ifndef LIBTESTIF_H
#define LIBTESTIF_H

#include <clang/Tooling/CompilationDatabase.h>
#include <llvm/ADT/StringRef.h>

#include <nlohmann/json.hpp>
#include <string>
#include <vector>

#include "share/analyze_setting.h"

namespace rocket {
namespace testif {

/**
 * @brief 获取文件中函数的测试用例接口
 * @param compilations: 编译参数
 * @param files: 文件路径
 * @return 返回json格式的测试用例接口数据
 */
nlohmann::json parse_test_interfaces(
    const clang::tooling::CompilationDatabase& compilations,
    std::vector<std::string> files, const share::RocketAnalyzeSetting& setting);

/**
 * @brief 获取文件include的依赖，暂不进行接口解析
 * @param compilations
 * @param files
 * @return
 */
nlohmann::json parse_dependencies(
    const clang::tooling::CompilationDatabase& compilations,
    std::vector<std::string> files, const share::RocketAnalyzeSetting& setting);

}  // namespace testif
}  // namespace rocket

#endif
